package com.chiaching.pms.controller;

import com.chiaching.pms.entity.PmsCategoryEntity;
import com.chiaching.pms.service.PmsCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 商品三级分类
 *
 * @author jiajing.he
 * @email 1738870995@qq.com
 * @date 2021-05-20 15:19:57
 */
@RestController
@RequestMapping("pms/pmscategory")
@Slf4j
public class PmsCategoryController {
    @Autowired
    private PmsCategoryService pmsCategoryService;


    @RequestMapping("queryList")
    public List<PmsCategoryEntity> queryList(PmsCategoryEntity pmsCategoryEntity){
        List<PmsCategoryEntity> pmsCategoryEntities = pmsCategoryService.queryList(pmsCategoryEntity);
        log.info("{}",pmsCategoryEntities);
        return pmsCategoryEntities;
    }

    @RequestMapping("/tree")
    public List<PmsCategoryEntity> queryTree(){
        return pmsCategoryService.queryTree();
    }


}
